package com.meet.framework.utils;


import android.app.Activity;
import android.graphics.Color;
import android.os.Build;
import android.view.View;

/**
 * 沉浸式实现
 */
public class SystemUI {

    public static void fixSystemUi(Activity activity){
        //Andorid 5.0
        if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP){
            //获取最顶层的View
            activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN
                    |View.SYSTEM_UI_FLAG_LAYOUT_STABLE);  //全屏显示，显示状态栏
            //颜色透明
            activity.getWindow().setStatusBarColor(Color.TRANSPARENT);
        }
    }

}
